<template>
  <div>
    <h3>Child</h3>
    <button @click.stop="$emit('test', 'abc')">分发事件</button>
  </div>
</template>

<script lang="ts">
export default {
  name: 'MyChild',
}
</script>

<script lang="ts" setup>
  // 定义自定义事件
  const emit = defineEmits(['test'])
  // emit('test', 12)
</script>

<style scoped>

</style>
